#ifndef FRIENDAPPLYWIDGET_H
#define FRIENDAPPLYWIDGET_H

#include <QDialog>
#include <QList>
#include "AbstractLayer/Network/threadmanger.h"
#include "UserLayer/GUI/FriendApplyWidget/friendapplybox.h"
#include "UserLayer/GUI/ContactWidget/contactwidget.h"
namespace Ui {
class FriendApplyWidget;
}

class FriendApplyWidget : public QDialog
{
    Q_OBJECT

public:
    FriendApplyWidget(const QString& useroc);
    void setParent(QWidget* parent);
    void appendFriendApply(const QString &friendoc, const QString &friendname);
    ~FriendApplyWidget();
signals:
    void s_widgetclose();
private:
    void addFriendApply(const QString& friendoc,const QString& friendname, const EnumLib::ApplyStatus status);
    void loadFriendApplyToUI();
private slots:
    void applyStatusChanged(const QString& friendoc,const EnumLib::ApplyStatus status);
private:
    Ui::FriendApplyWidget *ui;
    QHash<QString,FriendApplyBox*> boxhash;
    QString useroc;
    QWidget* parent;
};

#endif // FRIENDAPPLYWIDGET_H
